package com.auxgroup.smarthome.business.service.inner;

import com.auxgroup.bridge.business.inner.vo.RegionVo;
import com.auxgroup.bridge.business.inner.vo.ThirdCascaderVo;
import com.auxgroup.smarthome.business.service.AdministrativeDivisionInnerServiceFallback;
import com.auxgroup.smarthome.web.ApiResponse;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * Created by lixiaoxiao on 17-9-15.
 */
@FeignClient(name="INNER-SERVICE", fallback = AdministrativeDivisionInnerServiceFallback.class)
public interface AdministrativeDivisionInnerService {
    @GetMapping("/inner/region/provinces")
    ApiResponse<List<RegionVo>> getAllProvince();

    @GetMapping("/inner/region/provinces/{provinceId}/citys")
    ApiResponse<List<RegionVo>> getCityByProvince(@PathVariable("provinceId") String provinceId);

    @GetMapping("/inner/region/citys/{cityId}/districts")
    ApiResponse<List<RegionVo>> getDistrictByCity(@PathVariable("cityId") String cityId);

    @GetMapping("/inner/region/getThirdCasader")
    ApiResponse<List<ThirdCascaderVo>> getThirdCasader();
}
